package org.bing.engine.controller.lifecycle;

import org.bing.engine.common.logging.Log;
import org.bing.engine.common.logging.LogFactory;
import org.bing.engine.common.process.ProcessManager;
import org.bing.engine.controller.preference.ConfigurationManager;
import org.bing.engine.controller.preference.PreferenceManager;
import org.bing.engine.controller.service.LocalControllerManager;
import org.bing.engine.controller.service.LocalInstanceManager;
import org.bing.engine.utility.helper.GuidGenerator;

public abstract class AbstractControllerEnvirment {
    protected static final Log logger = LogFactory.getLog(AbstractControllerEnvirment.class);
    protected ConfigurationManager configurationManager;
    protected LocalControllerManager controllerManager;
    protected LocalInstanceManager instanceManager;
    protected PreferenceManager preferenceManager;
    protected ProcessManager processManager;

    public void setProcessManager(ProcessManager pm) {
        this.processManager = pm;
    }

    public void setControllerManager(LocalControllerManager mgr) {
        this.controllerManager = mgr;
    }

    public void setInstanceManager(LocalInstanceManager mgr) {
        this.instanceManager = mgr;
    }

    public void setPreferenceManager(PreferenceManager manager) {
        this.preferenceManager = manager;
    }

    public void setConfigurationManager(ConfigurationManager manager) {
        this.configurationManager = manager;
    }

    public String guid() {
        return GuidGenerator.generate();
    }
}